package com.geoboard.entity;

import java.io.Serializable;
import java.util.Date;

import org.codehaus.jackson.annotate.JsonIgnoreProperties;

import com.google.android.gms.maps.model.Marker;


@JsonIgnoreProperties({"marker"})
public class Post implements Serializable {
    private static final long serialVersionUID = 1L;
    private Long id;
    private long boardId;
    private String text;
    private String userName;
    private Date timestamp;
    private double lat;
    private double lng;
    private Marker marker; 
    
    protected void onCreate() {
        timestamp = new Date();
    }

    protected void onUpdate() {
        timestamp = new Date();
    }

    public Post() {
    }
    
    public Post(long boardId, String text) {
        this.boardId = boardId;
        this.text = text;
    }

    public Post(long boardId, String text, String userName,
            double lat, double lng) {
        this.boardId = boardId;
        this.text = text;
        this.userName = userName;
        this.lat = lat;
        this.lng = lng;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public long getBoardId() {
        return boardId;
    }

    public void setBoardId(long boardId) {
        this.boardId = boardId;
    }

    public String getText() {
        return text;
    }

    public void setText(String text) {
        this.text = text;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public Date getTimestamp() {
        return timestamp;
    }

    public void setTimestamp(Date timestamp) {
        this.timestamp = timestamp;
    }

    public double getLat() {
        return lat;
    }

    public void setLat(double lat) {
        this.lat = lat;
    }

    public double getLng() {
        return lng;
    }

    public void setLng(double lng) {
        this.lng = lng;
    }
    
    public Marker getMarker() {
        return marker;
    }

    public void setMarker(Marker marker) {
        this.marker = marker;
    }
}

